//引入模板
const express=require('express');
//引入连接池模板
const pool=require('../pool.js');
//创建路由器对象
const u=express.Router();
//1.宠物店医疗服务科室查询
u.get("/medical_service",(req,res) => {
	var  sql = "select * from medical_service";
	pool.query(sql,[],(err,result) => {
		if(err) throw err;
		res.send({ message: 'ok', code: 200 ,result});
	});
});
//2.专家案列查询
u.get("/medical_case",(req,res) => {
	var  sql = "select * from medical_case";
	pool.query(sql,[],(err,result) => {
		if(err) throw err;
		res.send({ message: 'ok', code: 200 ,result});
	});
});
//导出路由器对象
module.exports=u;